<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>hashcat-3.201: H:/TDDownload/Hashcat v3.20/hashcat-3.201/src/filehandling.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">hashcat-3.201
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_06fe396e3e859736df6d43ad26baa72e.html">hashcat-3.201</a></li><li class="navelem"><a class="el" href="dir_9ce3dfc5d638c7f8b2c4ec0f6627771b.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">filehandling.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;common.h&quot;</code><br />
<code>#include &quot;types.h&quot;</code><br />
<code>#include &quot;memory.h&quot;</code><br />
<code>#include &quot;filehandling.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for filehandling.c:</div>
<div class="dyncontent">
<div class="center"><img src="filehandling_8c__incl.gif" border="0" usemap="#_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2filehandling_8c" alt=""/></div>
<map name="_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2filehandling_8c" id="_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2filehandling_8c">
<area shape="rect"  title=" " alt="" coords="112,5,275,61"/>
<area shape="rect"  title=" " alt="" coords="5,109,88,136"/>
<area shape="rect"  title=" " alt="" coords="113,109,178,136"/>
<area shape="rect"  title=" " alt="" coords="203,109,283,136"/>
<area shape="rect"  title=" " alt="" coords="307,109,405,136"/>
</map>
</div>
</div>
<p><a href="filehandling_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a8c06c50405759b2a87532652eac7a5af"><td class="memItemLeft" align="right" valign="top">u64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filehandling_8c.html#a8c06c50405759b2a87532652eac7a5af">count_lines</a> (FILE *fd)</td></tr>
<tr class="separator:a8c06c50405759b2a87532652eac7a5af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a4a7adc4b47c4ad1c4834d9fb4f6a12"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filehandling_8c.html#a0a4a7adc4b47c4ad1c4834d9fb4f6a12">fgetl</a> (FILE *fp, char *line_buf)</td></tr>
<tr class="separator:a0a4a7adc4b47c4ad1c4834d9fb4f6a12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28c9d6a1df137a3a114e0b5317e220ed"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filehandling_8c.html#a28c9d6a1df137a3a114e0b5317e220ed">in_superchop</a> (char *buf)</td></tr>
<tr class="separator:a28c9d6a1df137a3a114e0b5317e220ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a8c06c50405759b2a87532652eac7a5af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c06c50405759b2a87532652eac7a5af">&#9670;&nbsp;</a></span>count_lines()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u64 count_lines </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>fd</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Author......: See docs/credits.txt License.....: MIT </p>

<p class="definition">Definition at line <a class="el" href="filehandling_8c_source.html#l00011">11</a> of file <a class="el" href="filehandling_8c_source.html">filehandling.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;{</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;  u64 cnt = 0;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;  <span class="keywordtype">char</span> *buf = (<span class="keywordtype">char</span> *) <a class="code" href="memory_8c.html#aac788cecd4f6c2a1524456f4a5db7cdc">hcmalloc</a> (HCBUFSIZ_LARGE + 1);</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;  <span class="keywordtype">char</span> prev = <span class="charliteral">&#39;\n&#39;</span>;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;  <span class="keywordflow">while</span> (!feof (fd))</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  {</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    <span class="keywordtype">size_t</span> nread = fread (buf, <span class="keyword">sizeof</span> (<span class="keywordtype">char</span>), HCBUFSIZ_LARGE, fd);</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    <span class="keywordflow">if</span> (nread &lt; 1) <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="keywordtype">size_t</span> i;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="keywordflow">for</span> (i = 0; i &lt; nread; i++)</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    {</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;      <span class="keywordflow">if</span> (prev == <span class="charliteral">&#39;\n&#39;</span>) cnt++;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;      prev = buf[i];</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    }</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  }</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  <a class="code" href="memory_8c.html#ad8ba3dcf1734b1d2c8679600f0f0c3c9">hcfree</a> (buf);</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  <span class="keywordflow">return</span> cnt;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;}</div><div class="ttc" id="memory_8c_html_ad8ba3dcf1734b1d2c8679600f0f0c3c9"><div class="ttname"><a href="memory_8c.html#ad8ba3dcf1734b1d2c8679600f0f0c3c9">hcfree</a></div><div class="ttdeci">void hcfree(void *ptr)</div><div class="ttdef"><b>Definition:</b> <a href="memory_8c_source.html#l00071">memory.c:71</a></div></div>
<div class="ttc" id="memory_8c_html_aac788cecd4f6c2a1524456f4a5db7cdc"><div class="ttname"><a href="memory_8c.html#aac788cecd4f6c2a1524456f4a5db7cdc">hcmalloc</a></div><div class="ttdeci">void * hcmalloc(const size_t sz)</div><div class="ttdef"><b>Definition:</b> <a href="memory_8c_source.html#l00024">memory.c:24</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="memory_8c_source.html#l00071">hcfree()</a>, and <a class="el" href="memory_8c_source.html#l00024">hcmalloc()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashes_8c_source.html#l00442">hashes_init_stage1()</a>, and <a class="el" href="tuningdb_8c_source.html#l00053">tuning_db_init()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="filehandling_8c_a8c06c50405759b2a87532652eac7a5af_cgraph.gif" border="0" usemap="#filehandling_8c_a8c06c50405759b2a87532652eac7a5af_cgraph" alt=""/></div>
<map name="filehandling_8c_a8c06c50405759b2a87532652eac7a5af_cgraph" id="filehandling_8c_a8c06c50405759b2a87532652eac7a5af_cgraph">
<area shape="rect"  title=" " alt="" coords="5,31,93,57"/>
<area shape="rect"  href="memory_8c.html#ad8ba3dcf1734b1d2c8679600f0f0c3c9" title=" " alt="" coords="150,5,207,32"/>
<area shape="rect"  href="memory_8c.html#aac788cecd4f6c2a1524456f4a5db7cdc" title=" " alt="" coords="141,56,216,83"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="filehandling_8c_a8c06c50405759b2a87532652eac7a5af_icgraph.gif" border="0" usemap="#filehandling_8c_a8c06c50405759b2a87532652eac7a5af_icgraph" alt=""/></div>
<map name="filehandling_8c_a8c06c50405759b2a87532652eac7a5af_icgraph" id="filehandling_8c_a8c06c50405759b2a87532652eac7a5af_icgraph">
<area shape="rect"  title=" " alt="" coords="659,31,747,57"/>
<area shape="rect"  href="hashes_8c.html#aa009c18f9bedd6179e77e24c5752807e" title=" " alt="" coords="476,5,611,32"/>
<area shape="rect"  href="tuningdb_8c.html#a82500a48411a912fa748e692dbafa187" title=" " alt="" coords="325,56,428,83"/>
<area shape="rect"  href="hashcat_8c.html#ac33e9695b713153c0fc7cce11696704b" title=" " alt="" coords="335,5,418,32"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,5,277,32"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,31,56,57"/>
<area shape="rect"  href="hashcat_8c.html#a9f3f1b757bdc2a874b4bb0dc657bde1d" title=" " alt="" coords="119,56,263,83"/>
</map>
</div>

</div>
</div>
<a id="a0a4a7adc4b47c4ad1c4834d9fb4f6a12"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a4a7adc4b47c4ad1c4834d9fb4f6a12">&#9670;&nbsp;</a></span>fgetl()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fgetl </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>fp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>line_buf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="filehandling_8c_source.html#l00040">40</a> of file <a class="el" href="filehandling_8c_source.html">filehandling.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;{</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  <span class="keywordtype">int</span> line_len = 0;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;  <span class="keywordflow">while</span> (!feof (fp))</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;  {</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">int</span> c = fgetc (fp);</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordflow">if</span> (c == EOF) <span class="keywordflow">break</span>;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    line_buf[line_len] = (char) c;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    line_len++;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordflow">if</span> (line_len == HCBUFSIZ_LARGE) line_len--;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordflow">if</span> (c == <span class="charliteral">&#39;\n&#39;</span>) <span class="keywordflow">break</span>;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  }</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  <span class="keywordflow">if</span> (line_len == 0) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;  <span class="keywordflow">if</span> (line_buf[line_len - 1] == <span class="charliteral">&#39;\n&#39;</span>)</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  {</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    line_len--;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    line_buf[line_len] = 0;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  }</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  <span class="keywordflow">if</span> (line_len == 0) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  <span class="keywordflow">if</span> (line_buf[line_len - 1] == <span class="charliteral">&#39;\r&#39;</span>)</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  {</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    line_len--;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    line_buf[line_len] = 0;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  }</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  <span class="keywordflow">return</span> (line_len);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="hashes_8c_source.html#l00442">hashes_init_stage1()</a>, <a class="el" href="hlfmt_8c_source.html#l00336">hlfmt_detect()</a>, <a class="el" href="rp_8c_source.html#l00713">kernel_rules_load()</a>, <a class="el" href="mpsp_8c_source.html#l01134">mask_ctx_init()</a>, <a class="el" href="potfile_8c_source.html#l00263">potfile_remove_parse()</a>, and <a class="el" href="opencl_8c_source.html#l01676">run_cracker()</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="filehandling_8c_a0a4a7adc4b47c4ad1c4834d9fb4f6a12_icgraph.gif" border="0" usemap="#filehandling_8c_a0a4a7adc4b47c4ad1c4834d9fb4f6a12_icgraph" alt=""/></div>
<map name="filehandling_8c_a0a4a7adc4b47c4ad1c4834d9fb4f6a12_icgraph" id="filehandling_8c_a0a4a7adc4b47c4ad1c4834d9fb4f6a12_icgraph">
<area shape="rect"  title=" " alt="" coords="1293,108,1340,135"/>
<area shape="rect"  href="hashes_8c.html#aa009c18f9bedd6179e77e24c5752807e" title=" " alt="" coords="969,32,1104,59"/>
<area shape="rect"  href="hlfmt_8c.html#a62181d9bee81afde6e22e0056d814de0" title=" " alt="" coords="1152,32,1245,59"/>
<area shape="rect"  href="rp_8c.html#aa6469718fd777a2a8efad529bb626c9e" title=" " alt="" coords="798,83,921,110"/>
<area shape="rect"  href="mpsp_8c.html#abfd45301318eec38b75a094fff49b551" title=" " alt="" coords="456,134,559,160"/>
<area shape="rect"  href="potfile_8c.html#ab34391a2f48c7208b15946dd8759eeea" title=" " alt="" coords="607,184,749,211"/>
<area shape="rect"  href="opencl_8c.html#af8bef12676549083a86b2986c456f72d" title=" " alt="" coords="1153,235,1244,262"/>
<area shape="rect"  href="hashcat_8c.html#ac33e9695b713153c0fc7cce11696704b" title=" " alt="" coords="325,134,408,160"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,134,277,160"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,134,56,160"/>
<area shape="rect"  href="straight_8c.html#ac38042838c02bcb1ca4b24b87047b34d" title=" " alt="" coords="621,83,735,110"/>
<area shape="rect"  href="dispatch_8c.html#a274118ca9e580459d6e82f6d61a34d59" title=" " alt="" coords="996,235,1077,262"/>
<area shape="rect"  href="dispatch_8c.html#a0502555fe69aef3e7b8c3886ef18c145" title=" " alt="" coords="1013,286,1060,312"/>
<area shape="rect"  href="dispatch_8c.html#a9e518ec031f388304424fb2852075038" title=" " alt="" coords="797,235,921,262"/>
<area shape="rect"  href="hashcat_8c.html#a9ec4f74d423ae0bd4aa6e960632b7086" title=" " alt="" coords="634,235,722,262"/>
<area shape="rect"  href="hashcat_8c.html#ad6cc36d03dcdad3413c794efecb3178a" title=" " alt="" coords="463,235,551,262"/>
<area shape="rect"  href="dispatch_8c.html#a45ffdf5a91d67bdc7a27b7fe7d39761a" title=" " alt="" coords="815,286,904,312"/>
</map>
</div>

</div>
</div>
<a id="a28c9d6a1df137a3a114e0b5317e220ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28c9d6a1df137a3a114e0b5317e220ed">&#9670;&nbsp;</a></span>in_superchop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int in_superchop </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="filehandling_8c_source.html#l00080">80</a> of file <a class="el" href="filehandling_8c_source.html">filehandling.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;{</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <span class="keywordtype">size_t</span> len = strlen (buf);</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="keywordflow">while</span> (len)</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  {</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordflow">if</span> (buf[len - 1] == <span class="charliteral">&#39;\n&#39;</span>)</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    {</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;      len--;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;      <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    }</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keywordflow">if</span> (buf[len - 1] == <span class="charliteral">&#39;\r&#39;</span>)</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    {</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;      len--;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;      <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    }</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordflow">break</span>;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  }</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;  buf[len] = 0;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  <span class="keywordflow">return</span> len;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="dispatch_8c_source.html#l00115">calc_stdin()</a>, <a class="el" href="mpsp_8c_source.html#l00534">mp_setup_usr()</a>, and <a class="el" href="tuningdb_8c_source.html#l00053">tuning_db_init()</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="filehandling_8c_a28c9d6a1df137a3a114e0b5317e220ed_icgraph.gif" border="0" usemap="#filehandling_8c_a28c9d6a1df137a3a114e0b5317e220ed_icgraph" alt=""/></div>
<map name="filehandling_8c_a28c9d6a1df137a3a114e0b5317e220ed_icgraph" id="filehandling_8c_a28c9d6a1df137a3a114e0b5317e220ed_icgraph">
<area shape="rect"  title=" " alt="" coords="1376,95,1475,121"/>
<area shape="rect"  href="dispatch_8c.html#a274118ca9e580459d6e82f6d61a34d59" title=" " alt="" coords="1235,19,1317,45"/>
<area shape="rect"  href="mpsp_8c.html#ae96d983a905f2c5acbca7ceaf177ce3d" title=" " alt="" coords="1224,95,1328,121"/>
<area shape="rect"  href="tuningdb_8c.html#a82500a48411a912fa748e692dbafa187" title=" " alt="" coords="1038,157,1141,184"/>
<area shape="rect"  href="dispatch_8c.html#a9e518ec031f388304424fb2852075038" title=" " alt="" coords="815,5,939,32"/>
<area shape="rect"  href="hashcat_8c.html#a9ec4f74d423ae0bd4aa6e960632b7086" title=" " alt="" coords="635,56,723,83"/>
<area shape="rect"  href="hashcat_8c.html#ad6cc36d03dcdad3413c794efecb3178a" title=" " alt="" coords="463,56,551,83"/>
<area shape="rect"  href="hashcat_8c.html#ac33e9695b713153c0fc7cce11696704b" title=" " alt="" coords="325,107,408,133"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,107,277,133"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,132,56,159"/>
<area shape="rect"  href="mpsp_8c.html#abfd45301318eec38b75a094fff49b551" title=" " alt="" coords="456,107,559,133"/>
<area shape="rect"  href="mpsp_8c.html#a64fbce547686c2280f2c82a74900f97b" title=" " alt="" coords="1003,56,1176,83"/>
<area shape="rect"  href="mpsp_8c.html#a0bc1fdc7efaa7d7cb8d83aea4a87e02e" title=" " alt="" coords="799,56,955,83"/>
<area shape="rect"  href="hashcat_8c.html#a9f3f1b757bdc2a874b4bb0dc657bde1d" title=" " alt="" coords="607,157,751,184"/>
</map>
</div>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
